﻿using System;
using System.Collections.Generic;

namespace Sizebox.CharacterEditor
{
	// Token: 0x02000264 RID: 612
	[Serializable]
	public class SkeletonPresetData
	{
		// Token: 0x06000D9A RID: 3482 RVA: 0x0006AF44 File Offset: 0x00069144
		public SkeletonPresetData(string dataId, CharacterEditor editor)
		{
			this.hashCode = editor.SkeletonHashCode;
			Dictionary<string, EditBone> boneMap = editor.SkeletonEdit.BoneMap;
			List<BoneData> list = new List<BoneData>();
			foreach (string key in boneMap.Keys)
			{
				BoneTransformData data = boneMap[key].GetData(dataId);
				if (!(data == BoneTransformData.Default))
				{
					BoneData item;
					item.key = key;
					item.data = data;
					list.Add(item);
				}
			}
			this.boneData = list.ToArray();
			this.skeletonMap = editor.SkeletonEdit.Skeleton.GenerateDataMap();
		}

		// Token: 0x06000D9B RID: 3483 RVA: 0x0006B020 File Offset: 0x00069220
		public bool Validate()
		{
			return this.boneData != null && this.hashCode != null;
		}

		// Token: 0x04001279 RID: 4729
		public string hashCode;

		// Token: 0x0400127A RID: 4730
		public BoneData[] boneData;

		// Token: 0x0400127B RID: 4731
		public SkeletonDataMap[] skeletonMap;
	}
}
